package com.thz.friend.controller.registration;

import com.thz.common.core.controller.BaseController;
import com.thz.common.core.result.Result;
import com.thz.friend.pojo.course.Course;
import com.thz.friend.pojo.course.vo.CourseVO;
import com.thz.friend.service.registration.ICourseRegistrationService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.NonNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description
 * @Author thz
 * @Date 2025/5/10
 */
@RestController
@RequestMapping("/registration")
@Tag(name = "学生报名接口")
public class CourseRegistrationController extends BaseController {

    @Autowired
    private ICourseRegistrationService courseRegistrationService;

    @PostMapping("add")
    public Result addRegistration(@NonNull @RequestParam("courseId") Long courseId) {
        return IToResult(courseRegistrationService.add(courseId));
    }

}
